package org.crl.blogsystem.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

@Data
public class LikeId implements Serializable {
    private Long user;
    private Long blog;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LikeId likeId = (LikeId) o;
        return user.equals(likeId.user) && blog.equals(likeId.blog);
    }

    @Override
    public int hashCode() {
        return Objects.hash(user, blog);
    }
}